home *** CD-ROM | disk | FTP | other *** search
- /*
- * VideoFrame_ui.c - User interface object initialization functions.
- * This file was generated by `gxv' from `VideoFrame.G'.
- * DO NOT EDIT BY HAND.
- */
-
- #include <stdio.h>
- #include <sys/param.h>
- #include <sys/types.h>
- #include <xview/xview.h>
- #include <xview/canvas.h>
- #include <xview/panel.h>
- #include <xview/scrollbar.h>
- #include <xview/svrimage.h>
- #include <xview/termsw.h>
- #include <xview/text.h>
- #include <xview/tty.h>
- #include <xview/xv_xrect.h>
- #include "VideoFrame_ui.h"
-
- /*
- * Create object `documentMenu' in the specified instance.
- */
- Xv_opaque
- VideoFrame_documentMenu_create(caddr_t ip, Xv_opaque owner)
- {
- extern Menu_item NewHandler(Menu_item, Menu_generate);
- extern Menu_item OpenHandler(Menu_item, Menu_generate);
- extern Menu_item SaveHandler(Menu_item, Menu_generate);
- extern Menu_item SaveAsHandler(Menu_item, Menu_generate);
- extern Menu_item CloseHandler(Menu_item, Menu_generate);
- extern Menu_item QuitHandler(Menu_item, Menu_generate);
- Xv_opaque obj;
-
- obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
- XV_KEY_DATA, INSTANCE, ip,
- MENU_TITLE_ITEM, "Document",
- MENU_ITEM,
- XV_KEY_DATA, INSTANCE, ip,
- MENU_STRING, "New",
- MENU_GEN_PROC, NewHandler,
- NULL,
- MENU_ITEM,
- XV_KEY_DATA, INSTANCE, ip,
- MENU_STRING, "Open...",
- MENU_GEN_PROC, OpenHandler,
- NULL,
- MENU_ITEM,
- XV_KEY_DATA, INSTANCE, ip,
- MENU_STRING, "Save",
- MENU_GEN_PROC, SaveHandler,
- NULL,
- MENU_ITEM,
- XV_KEY_DATA, INSTANCE, ip,
- MENU_STRING, "Save As...",
- MENU_GEN_PROC, SaveAsHandler,
- NULL,
- MENU_ITEM,
- XV_KEY_DATA, INSTANCE, ip,
- MENU_STRING, "Close",
- MENU_GEN_PROC, CloseHandler,
- NULL,
- MENU_ITEM,
- XV_KEY_DATA, INSTANCE, ip,
- MENU_STRING, "Quit",
- MENU_GEN_PROC, QuitHandler,
- NULL,
- MENU_DEFAULT, 3,
- MENU_GEN_PIN_WINDOW, owner, "Document",
- NULL);
- return obj;
- }
-
- /*
- * Initialize an instance of object `mainWindow'.
- */
- VideoFrame_mainWindow_objects *
- VideoFrame_mainWindow_objects_initialize(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- if (!ip && !(ip = (VideoFrame_mainWindow_objects *) calloc(1, sizeof (VideoFrame_mainWindow_objects))))
- return (VideoFrame_mainWindow_objects *) NULL;
- if (!ip->mainWindow)
- ip->mainWindow = VideoFrame_mainWindow_mainWindow_create(ip, owner);
- if (!ip->mainPanel)
- ip->mainPanel = VideoFrame_mainWindow_mainPanel_create(ip, ip->mainWindow);
- if (!ip->documentMenuButton)
- ip->documentMenuButton = VideoFrame_mainWindow_documentMenuButton_create(ip, ip->mainPanel);
- if (!ip->currentSelectionMessage)
- ip->currentSelectionMessage = VideoFrame_mainWindow_currentSelectionMessage_create(ip, ip->mainPanel);
- if (!ip->editList)
- ip->editList = VideoFrame_mainWindow_editList_create(ip, ip->mainPanel);
- if (!ip->labelField)
- ip->labelField = VideoFrame_mainWindow_labelField_create(ip, ip->mainPanel);
- if (!ip->addButton)
- ip->addButton = VideoFrame_mainWindow_addButton_create(ip, ip->mainPanel);
- if (!ip->modifyButton)
- ip->modifyButton = VideoFrame_mainWindow_modifyButton_create(ip, ip->mainPanel);
- if (!ip->deleteButton)
- ip->deleteButton = VideoFrame_mainWindow_deleteButton_create(ip, ip->mainPanel);
- if (!ip->deleteAllButton)
- ip->deleteAllButton = VideoFrame_mainWindow_deleteAllButton_create(ip, ip->mainPanel);
- if (!ip->input1Panel)
- ip->input1Panel = VideoFrame_mainWindow_input1Panel_create(ip, ip->mainWindow);
- if (!ip->input1Message)
- ip->input1Message = VideoFrame_mainWindow_input1Message_create(ip, ip->input1Panel);
- if (!ip->input1ShownChoice)
- ip->input1ShownChoice = VideoFrame_mainWindow_input1ShownChoice_create(ip, ip->input1Panel);
- if (!ip->input1CroppedChoice)
- ip->input1CroppedChoice = VideoFrame_mainWindow_input1CroppedChoice_create(ip, ip->input1Panel);
- if (!ip->input1AspectChoice)
- ip->input1AspectChoice = VideoFrame_mainWindow_input1AspectChoice_create(ip, ip->input1Panel);
- if (!ip->input1BrightSlider)
- ip->input1BrightSlider = VideoFrame_mainWindow_input1BrightSlider_create(ip, ip->input1Panel);
- if (!ip->input1ContrastSlider)
- ip->input1ContrastSlider = VideoFrame_mainWindow_input1ContrastSlider_create(ip, ip->input1Panel);
- if (!ip->input1SaturationSlider)
- ip->input1SaturationSlider = VideoFrame_mainWindow_input1SaturationSlider_create(ip, ip->input1Panel);
- if (!ip->input1HueSlider)
- ip->input1HueSlider = VideoFrame_mainWindow_input1HueSlider_create(ip, ip->input1Panel);
- if (!ip->input2Panel)
- ip->input2Panel = VideoFrame_mainWindow_input2Panel_create(ip, ip->mainWindow);
- if (!ip->input2Message)
- ip->input2Message = VideoFrame_mainWindow_input2Message_create(ip, ip->input2Panel);
- if (!ip->input2ShownChoice)
- ip->input2ShownChoice = VideoFrame_mainWindow_input2ShownChoice_create(ip, ip->input2Panel);
- if (!ip->input2CroppedChoice)
- ip->input2CroppedChoice = VideoFrame_mainWindow_input2CroppedChoice_create(ip, ip->input2Panel);
- if (!ip->input2AspectChoice)
- ip->input2AspectChoice = VideoFrame_mainWindow_input2AspectChoice_create(ip, ip->input2Panel);
- if (!ip->input2BrightSlider)
- ip->input2BrightSlider = VideoFrame_mainWindow_input2BrightSlider_create(ip, ip->input2Panel);
- if (!ip->input2ContrastSlider)
- ip->input2ContrastSlider = VideoFrame_mainWindow_input2ContrastSlider_create(ip, ip->input2Panel);
- if (!ip->input2SaturationSlider)
- ip->input2SaturationSlider = VideoFrame_mainWindow_input2SaturationSlider_create(ip, ip->input2Panel);
- if (!ip->input2HueSlider)
- ip->input2HueSlider = VideoFrame_mainWindow_input2HueSlider_create(ip, ip->input2Panel);
- return ip;
- }
-
- /*
- * Create object `mainWindow' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_mainWindow_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
- Xv_opaque mainWindow_image;
- static unsigned short mainWindow_bits[] = {
- #include "icons/VideoFrame"
- };
-
- mainWindow_image = xv_create(XV_NULL, SERVER_IMAGE,
- SERVER_IMAGE_DEPTH, 1,
- SERVER_IMAGE_BITS, mainWindow_bits,
- XV_WIDTH, 64,
- XV_HEIGHT, 64,
- NULL);
- obj = xv_create(owner, FRAME,
- XV_KEY_DATA, INSTANCE, ip,
- XV_WIDTH, 700,
- XV_HEIGHT, 500,
- XV_LABEL, "VideoFrame",
- FRAME_SHOW_FOOTER, TRUE,
- FRAME_SHOW_RESIZE_CORNER, TRUE,
- FRAME_ICON, xv_create(XV_NULL, ICON,
- ICON_IMAGE, mainWindow_image,
- NULL),
- NULL);
- return obj;
- }
-
- /*
- * Create object `mainPanel' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_mainPanel_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 0,
- XV_Y, 0,
- XV_WIDTH, WIN_EXTEND_TO_EDGE,
- XV_HEIGHT, 200,
- WIN_BORDER, FALSE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `documentMenuButton' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_documentMenuButton_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 32,
- XV_Y, 16,
- PANEL_LABEL_STRING, "Document",
- PANEL_ITEM_MENU, VideoFrame_documentMenu_create((caddr_t) ip, ip->mainWindow),
- NULL);
- return obj;
- }
-
- /*
- * Create object `currentSelectionMessage' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_currentSelectionMessage_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 344,
- XV_Y, 24,
- PANEL_LABEL_STRING, "Current Selection : New Edit",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `editList' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_editList_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern int EditListHandler(Panel_item, char *, Xv_opaque, Panel_list_op, Event *, int);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_LIST,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 16,
- XV_Y, 56,
- PANEL_LIST_WIDTH, 250,
- PANEL_LIST_DISPLAY_ROWS, 5,
- PANEL_LAYOUT, PANEL_HORIZONTAL,
- PANEL_READ_ONLY, TRUE,
- PANEL_CHOOSE_ONE, TRUE,
- PANEL_CHOOSE_NONE, TRUE,
- PANEL_NOTIFY_PROC, EditListHandler,
- NULL);
- return obj;
- }
-
- /*
- * Create object `labelField' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_labelField_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern Panel_setting LabelFieldHandler(Panel_item, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_TEXT,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 344,
- XV_Y, 72,
- PANEL_VALUE_DISPLAY_LENGTH, 35,
- PANEL_VALUE_STORED_LENGTH, 255,
- PANEL_LABEL_STRING, "Label :",
- PANEL_LAYOUT, PANEL_HORIZONTAL,
- PANEL_READ_ONLY, FALSE,
- PANEL_NOTIFY_PROC, LabelFieldHandler,
- NULL);
- return obj;
- }
-
- /*
- * Create object `addButton' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_addButton_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void AddHandler(Panel_item, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 320,
- XV_Y, 144,
- PANEL_LABEL_STRING, " Add ",
- PANEL_NOTIFY_PROC, AddHandler,
- NULL);
- return obj;
- }
-
- /*
- * Create object `modifyButton' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_modifyButton_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void ModifyHandler(Panel_item, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 406,
- XV_Y, 144,
- PANEL_LABEL_STRING, " Modify ",
- PANEL_NOTIFY_PROC, ModifyHandler,
- NULL);
- return obj;
- }
-
- /*
- * Create object `deleteButton' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_deleteButton_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void DeleteHandler(Panel_item, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 492,
- XV_Y, 144,
- PANEL_LABEL_STRING, " Delete ",
- PANEL_NOTIFY_PROC, DeleteHandler,
- NULL);
- return obj;
- }
-
- /*
- * Create object `deleteAllButton' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_deleteAllButton_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void DeleteAllHandler(Panel_item, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 578,
- XV_Y, 144,
- PANEL_LABEL_STRING, "Delete All ",
- PANEL_NOTIFY_PROC, DeleteAllHandler,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input1Panel' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input1Panel_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 0,
- XV_Y, (int)xv_get(ip->mainPanel, XV_Y) +
- (int)xv_get(ip->mainPanel, XV_HEIGHT),
- XV_WIDTH, 350,
- XV_HEIGHT, WIN_EXTEND_TO_EDGE,
- WIN_BORDER, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input1Message' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input1Message_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 136,
- XV_Y, 16,
- PANEL_LABEL_STRING, "Input 1",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input1ShownChoice' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input1ShownChoice_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void VideoFrame_mainWindow_input1ShownChoice_notify_callback(Panel_item, int, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_CHOICE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 16,
- XV_Y, 56,
- PANEL_CHOICE_NROWS, 1,
- PANEL_LAYOUT, PANEL_HORIZONTAL,
- PANEL_CHOOSE_NONE, FALSE,
- PANEL_NOTIFY_PROC, VideoFrame_mainWindow_input1ShownChoice_notify_callback,
- PANEL_CHOICE_STRINGS,
- "Visible",
- "Hidden",
- NULL,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input1CroppedChoice' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input1CroppedChoice_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void VideoFrame_mainWindow_input1CroppedChoice_notify_callback(Panel_item, int, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_CHOICE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 200,
- XV_Y, 56,
- PANEL_CHOICE_NROWS, 1,
- PANEL_LAYOUT, PANEL_HORIZONTAL,
- PANEL_CHOOSE_NONE, FALSE,
- PANEL_NOTIFY_PROC, VideoFrame_mainWindow_input1CroppedChoice_notify_callback,
- PANEL_CHOICE_STRINGS,
- "Crop",
- "Squeeze",
- NULL,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input1AspectChoice' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input1AspectChoice_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void VideoFrame_mainWindow_input1AspectChoice_notify_callback(Panel_item, int, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_CHOICE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 16,
- XV_Y, 104,
- PANEL_CHOICE_NROWS, 1,
- PANEL_LAYOUT, PANEL_HORIZONTAL,
- PANEL_CHOOSE_NONE, FALSE,
- PANEL_LABEL_STRING, "Aspect Ratio:",
- PANEL_NOTIFY_PROC, VideoFrame_mainWindow_input1AspectChoice_notify_callback,
- PANEL_CHOICE_STRINGS,
- "Any",
- "4 : 3",
- NULL,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input1BrightSlider' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input1BrightSlider_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void BrightnessHandler(Panel_item, int, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_SLIDER,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 3,
- XV_Y, 152,
- PANEL_SLIDER_WIDTH, 200,
- PANEL_TICKS, 0,
- PANEL_LABEL_STRING, "Brightness :",
- PANEL_DIRECTION, PANEL_HORIZONTAL,
- PANEL_SLIDER_END_BOXES, TRUE,
- PANEL_SHOW_RANGE, FALSE,
- PANEL_SHOW_VALUE, FALSE,
- PANEL_MIN_VALUE, 0,
- PANEL_MAX_VALUE, 255,
- PANEL_VALUE, 0,
- PANEL_NOTIFY_PROC, BrightnessHandler,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input1ContrastSlider' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input1ContrastSlider_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void ContrastHandler(Panel_item, int, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_SLIDER,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 20,
- XV_Y, 184,
- PANEL_SLIDER_WIDTH, 200,
- PANEL_TICKS, 0,
- PANEL_LABEL_STRING, "Contrast :",
- PANEL_DIRECTION, PANEL_HORIZONTAL,
- PANEL_SLIDER_END_BOXES, TRUE,
- PANEL_SHOW_RANGE, FALSE,
- PANEL_SHOW_VALUE, FALSE,
- PANEL_MIN_VALUE, 0,
- PANEL_MAX_VALUE, 255,
- PANEL_VALUE, 0,
- PANEL_NOTIFY_PROC, ContrastHandler,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input1SaturationSlider' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input1SaturationSlider_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void SaturationHandler(Panel_item, int, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_SLIDER,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 7,
- XV_Y, 216,
- PANEL_SLIDER_WIDTH, 200,
- PANEL_TICKS, 0,
- PANEL_LABEL_STRING, "Saturation :",
- PANEL_DIRECTION, PANEL_HORIZONTAL,
- PANEL_SLIDER_END_BOXES, TRUE,
- PANEL_SHOW_RANGE, FALSE,
- PANEL_SHOW_VALUE, FALSE,
- PANEL_MIN_VALUE, 0,
- PANEL_MAX_VALUE, 255,
- PANEL_VALUE, 0,
- PANEL_NOTIFY_PROC, SaturationHandler,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input1HueSlider' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input1HueSlider_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void HueHandler(Panel_item, int, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_SLIDER,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 51,
- XV_Y, 248,
- PANEL_SLIDER_WIDTH, 200,
- PANEL_TICKS, 0,
- PANEL_LABEL_STRING, "Hue :",
- PANEL_DIRECTION, PANEL_HORIZONTAL,
- PANEL_SLIDER_END_BOXES, TRUE,
- PANEL_SHOW_RANGE, FALSE,
- PANEL_SHOW_VALUE, FALSE,
- PANEL_MIN_VALUE, 0,
- PANEL_MAX_VALUE, 255,
- PANEL_VALUE, 0,
- PANEL_NOTIFY_PROC, HueHandler,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input2Panel' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input2Panel_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, (int)xv_get(ip->input1Panel, XV_X) +
- (int)xv_get(ip->input1Panel, XV_WIDTH) + 2,
- XV_Y, (int)xv_get(ip->mainPanel, XV_Y) +
- (int)xv_get(ip->mainPanel, XV_HEIGHT),
- XV_WIDTH, WIN_EXTEND_TO_EDGE,
- XV_HEIGHT, WIN_EXTEND_TO_EDGE,
- WIN_BORDER, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input2Message' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input2Message_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 146,
- XV_Y, 16,
- PANEL_LABEL_STRING, "Input 2",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input2ShownChoice' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input2ShownChoice_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void VideoFrame_mainWindow_input2ShownChoice_notify_callback(Panel_item, int, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_CHOICE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 26,
- XV_Y, 56,
- PANEL_CHOICE_NROWS, 1,
- PANEL_LAYOUT, PANEL_HORIZONTAL,
- PANEL_CHOOSE_NONE, FALSE,
- PANEL_NOTIFY_PROC, VideoFrame_mainWindow_input2ShownChoice_notify_callback,
- PANEL_CHOICE_STRINGS,
- "Visible",
- "Hidden",
- NULL,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input2CroppedChoice' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input2CroppedChoice_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void VideoFrame_mainWindow_input2CroppedChoice_notify_callback(Panel_item, int, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_CHOICE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 210,
- XV_Y, 56,
- PANEL_CHOICE_NROWS, 1,
- PANEL_LAYOUT, PANEL_HORIZONTAL,
- PANEL_CHOOSE_NONE, FALSE,
- PANEL_NOTIFY_PROC, VideoFrame_mainWindow_input2CroppedChoice_notify_callback,
- PANEL_CHOICE_STRINGS,
- "Crop",
- "Squeeze",
- NULL,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input2AspectChoice' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input2AspectChoice_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void VideoFrame_mainWindow_input2AspectChoice_notify_callback(Panel_item, int, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_CHOICE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 26,
- XV_Y, 104,
- PANEL_CHOICE_NROWS, 1,
- PANEL_LAYOUT, PANEL_HORIZONTAL,
- PANEL_CHOOSE_NONE, FALSE,
- PANEL_LABEL_STRING, "Aspect Ratio:",
- PANEL_NOTIFY_PROC, VideoFrame_mainWindow_input2AspectChoice_notify_callback,
- PANEL_CHOICE_STRINGS,
- "Any",
- "4 : 3",
- NULL,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input2BrightSlider' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input2BrightSlider_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void BrightnessHandler(Panel_item, int, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_SLIDER,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 8,
- XV_Y, 152,
- PANEL_SLIDER_WIDTH, 200,
- PANEL_TICKS, 0,
- PANEL_LABEL_STRING, "Brightness :",
- PANEL_DIRECTION, PANEL_HORIZONTAL,
- PANEL_SLIDER_END_BOXES, TRUE,
- PANEL_SHOW_RANGE, FALSE,
- PANEL_SHOW_VALUE, FALSE,
- PANEL_MIN_VALUE, 0,
- PANEL_MAX_VALUE, 255,
- PANEL_VALUE, 0,
- PANEL_NOTIFY_PROC, BrightnessHandler,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input2ContrastSlider' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input2ContrastSlider_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void ContrastHandler(Panel_item, int, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_SLIDER,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 25,
- XV_Y, 184,
- PANEL_SLIDER_WIDTH, 200,
- PANEL_TICKS, 0,
- PANEL_LABEL_STRING, "Contrast :",
- PANEL_DIRECTION, PANEL_HORIZONTAL,
- PANEL_SLIDER_END_BOXES, TRUE,
- PANEL_SHOW_RANGE, FALSE,
- PANEL_SHOW_VALUE, FALSE,
- PANEL_MIN_VALUE, 0,
- PANEL_MAX_VALUE, 255,
- PANEL_VALUE, 0,
- PANEL_NOTIFY_PROC, ContrastHandler,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input2SaturationSlider' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input2SaturationSlider_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void SaturationHandler(Panel_item, int, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_SLIDER,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 12,
- XV_Y, 216,
- PANEL_SLIDER_WIDTH, 200,
- PANEL_TICKS, 0,
- PANEL_LABEL_STRING, "Saturation :",
- PANEL_DIRECTION, PANEL_HORIZONTAL,
- PANEL_SLIDER_END_BOXES, TRUE,
- PANEL_SHOW_RANGE, FALSE,
- PANEL_SHOW_VALUE, FALSE,
- PANEL_MIN_VALUE, 0,
- PANEL_MAX_VALUE, 255,
- PANEL_VALUE, 0,
- PANEL_NOTIFY_PROC, SaturationHandler,
- NULL);
- return obj;
- }
-
- /*
- * Create object `input2HueSlider' in the specified instance.
- */
- Xv_opaque
- VideoFrame_mainWindow_input2HueSlider_create(VideoFrame_mainWindow_objects *ip, Xv_opaque owner)
- {
- extern void HueHandler(Panel_item, int, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_SLIDER,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 56,
- XV_Y, 248,
- PANEL_SLIDER_WIDTH, 200,
- PANEL_TICKS, 0,
- PANEL_LABEL_STRING, "Hue :",
- PANEL_DIRECTION, PANEL_HORIZONTAL,
- PANEL_SLIDER_END_BOXES, TRUE,
- PANEL_SHOW_RANGE, FALSE,
- PANEL_SHOW_VALUE, FALSE,
- PANEL_MIN_VALUE, 0,
- PANEL_MAX_VALUE, 255,
- PANEL_VALUE, 0,
- PANEL_NOTIFY_PROC, HueHandler,
- NULL);
- return obj;
- }
-
- /*
- * Initialize an instance of object `inputWindow1'.
- */
- VideoFrame_inputWindow1_objects *
- VideoFrame_inputWindow1_objects_initialize(VideoFrame_inputWindow1_objects *ip, Xv_opaque owner)
- {
- if (!ip && !(ip = (VideoFrame_inputWindow1_objects *) calloc(1, sizeof (VideoFrame_inputWindow1_objects))))
- return (VideoFrame_inputWindow1_objects *) NULL;
- if (!ip->inputWindow1)
- ip->inputWindow1 = VideoFrame_inputWindow1_inputWindow1_create(ip, owner);
- return ip;
- }
-
- /*
- * Create object `inputWindow1' in the specified instance.
- */
- Xv_opaque
- VideoFrame_inputWindow1_inputWindow1_create(VideoFrame_inputWindow1_objects *ip, Xv_opaque owner)
- {
- extern Notify_value VideoFrame_inputWindow1_event_callback(Xv_window, Event *, Notify_arg, Notify_event_type);
- Xv_opaque obj;
- Xv_opaque inputWindow1_image;
- static unsigned short inputWindow1_bits[] = {
- #include "icons/1"
- };
-
- inputWindow1_image = xv_create(XV_NULL, SERVER_IMAGE,
- SERVER_IMAGE_DEPTH, 1,
- SERVER_IMAGE_BITS, inputWindow1_bits,
- XV_WIDTH, 64,
- XV_HEIGHT, 64,
- NULL);
- obj = xv_create(owner, FRAME,
- XV_KEY_DATA, INSTANCE, ip,
- XV_WIDTH, 640,
- XV_HEIGHT, 480,
- XV_LABEL, "Input1",
- XV_SHOW, TRUE,
- FRAME_SHOW_FOOTER, FALSE,
- FRAME_SHOW_RESIZE_CORNER, TRUE,
- FRAME_ICON, xv_create(XV_NULL, ICON,
- ICON_IMAGE, inputWindow1_image,
- NULL),
- NULL);
- xv_set(obj, WIN_CONSUME_EVENTS,
- NULL, NULL);
- notify_interpose_event_func(obj,
- (Notify_func) VideoFrame_inputWindow1_event_callback, NOTIFY_SAFE);
- return obj;
- }
-
- /*
- * Initialize an instance of object `inputWindow2'.
- */
- VideoFrame_inputWindow2_objects *
- VideoFrame_inputWindow2_objects_initialize(VideoFrame_inputWindow2_objects *ip, Xv_opaque owner)
- {
- if (!ip && !(ip = (VideoFrame_inputWindow2_objects *) calloc(1, sizeof (VideoFrame_inputWindow2_objects))))
- return (VideoFrame_inputWindow2_objects *) NULL;
- if (!ip->inputWindow2)
- ip->inputWindow2 = VideoFrame_inputWindow2_inputWindow2_create(ip, owner);
- return ip;
- }
-
- /*
- * Create object `inputWindow2' in the specified instance.
- */
- Xv_opaque
- VideoFrame_inputWindow2_inputWindow2_create(VideoFrame_inputWindow2_objects *ip, Xv_opaque owner)
- {
- extern Notify_value VideoFrame_inputWindow2_event_callback(Xv_window, Event *, Notify_arg, Notify_event_type);
- Xv_opaque obj;
- Xv_opaque inputWindow2_image;
- static unsigned short inputWindow2_bits[] = {
- #include "icons/2"
- };
-
- inputWindow2_image = xv_create(XV_NULL, SERVER_IMAGE,
- SERVER_IMAGE_DEPTH, 1,
- SERVER_IMAGE_BITS, inputWindow2_bits,
- XV_WIDTH, 64,
- XV_HEIGHT, 64,
- NULL);
- obj = xv_create(owner, FRAME,
- XV_KEY_DATA, INSTANCE, ip,
- XV_WIDTH, 640,
- XV_HEIGHT, 480,
- XV_LABEL, "Input2",
- XV_SHOW, TRUE,
- FRAME_SHOW_FOOTER, FALSE,
- FRAME_SHOW_RESIZE_CORNER, TRUE,
- FRAME_ICON, xv_create(XV_NULL, ICON,
- ICON_IMAGE, inputWindow2_image,
- NULL),
- NULL);
- xv_set(obj, WIN_CONSUME_EVENTS,
- NULL, NULL);
- notify_interpose_event_func(obj,
- (Notify_func) VideoFrame_inputWindow2_event_callback, NOTIFY_SAFE);
- return obj;
- }
-
-